<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude">

  <xi:include href="tb-master.html" />

<head>
	<meta content="text/html; charset=UTF-8" http-equiv="content-type" />
  	<title></title>
	${tmpl_context.googlemaps_js()}
</head>
<body >
	<div id="tabs">
		<ul>
			<li><h3><a href="#tabs-address">1. Address</a></h3></li>
			<li><h3><a href="#tabs-description">2. Description</a></h3></li>
			<li><h3><a href="#tabs-save">3. Save</a></h3></li>
		</ul>
		<div id="tabs-address" >
			${tb_addressform()}
		</div>
		<div id="tabs-description">
				${tmpl_context.agency_form(value=session['agency'])}
		</div>
		<div id="tabs-save">
			<div id="span-24">
				<h1 py:if="session['address'].has_key('google_address')">${session['address']['google_address']}</h1>
				<p>
					<py:for each="item in ['country_name_code','country_name',
											'administrative_area_name',
											'sub_administrative_area_name',
											'locality_name',]">
					<span py:if="session['address'].has_key(item)">
						${session['address'][item]} &gt;&gt;
					</span>
					</py:for>
				</p>

				<fieldset>
		     		<legend><strong>Description</strong></legend>
		     		<table py:if="len(session['agency'].keys()) > 0">
		     			<tr py:for="field in tmpl_context.agency_form.fields()">
		     				<th>${field.label_text}</th>
		     				<td>${session['agency'][field.name]}</td>
		     			</tr>
		     		</table>
		       	</fieldset>
				<fieldset>
		     		<legend><strong>Address</strong></legend>
					<table py:if="len(session['address'].keys()) > 0">
		     			<tr py:for="field in tmpl_context.address_form.fields()">
		     				<th>${field.label_text}</th>
		     				<td>${session['address'][field.name]}</td>
		     			</tr>
		     		</table>
		       	</fieldset>
		    ${tmpl_context.session_form()}
			</div>
		</div>
</div>
</body>
</html>
